package com.hoyo.service;

import com.hoyo.common.PageInfo;
import com.hoyo.domain.Comment;
import com.hoyo.domain.ReportItem;
import com.hoyo.domain.User;
import com.hoyo.domain.UserInfo;

public interface CommentService {
	
	/**
	 * ��������
	 * @param movieId
	 * @param account
	 * @param comment
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> newComment(int movieId, String account, String comment) throws Exception;
	
	/**
	 * �������ۻظ�
	 * @param comment
	 * @param user
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> newReplyComment(Comment comment, User user) throws Exception;
	
	void newCommentReport(int movieId, int commentId, String account, String reason,String type) throws Exception;
	
	/**
	 * ͨ������id��ҳ��ȡ���ڴ����۵����лظ�
	 * @param commentId
	 * @param pageNum
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> pageFindReplyCommentsByCommentId(int commentId, int pageNum) throws Exception;
	
	/**
	 * ��ҳ��ȡ���ٱ�����
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<ReportItem> pageFindBeReportedComments(int pageNum, int pageSize) throws Exception;
	
	/**
	 * ���۾ٱ�����
	 * @param id
	 * @param userId
	 * @param actionType
	 * @return
	 * @throws Exception
	 */
	PageInfo<ReportItem> reportHandle(int id, int userId, int actionType)throws Exception;
	
	/**
	 * ��ҳ��ȡ��������
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> pageFindComments(int pageNum, int pageSize) throws Exception;
	
	/**
	 * ɾ������
	 * @param id
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> removeOne(int id) throws Exception;
	
	/**
	 * ɾ�������ҷ����߱����
	 * @param userId
	 * @param commentId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> login4bid(int userId, int commentId) throws Exception;
	
	/**
	 * ɾ�������ҷ����߱�����
	 * @param userId
	 * @param commentId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Comment> comment4bid(int userId, int commentId) throws Exception;
}
